<div class='fui-page  fui-page-current'>
    <div class="fui-header">
		<div class="title">会员资料</div> 
		<div class="fui-header-right">&nbsp;</div>
	</div>
	<div class='fui-content'>
		<div class="fui-list-group">
			<a class="fui-list" href="javascript:;" ng-click="access_json('core/member.cavatar/')">
				<div class="fui-list-media">
					<img class="round avatar" ng-src="{{tomedia(pagedata.post.avatar)  || '../core/resource/images/gw-user.png'}}" />
				</div>
				<div class="fui-list-inner">
					<div class="title nickname">{{pagedata.post.nickname || '匿名'}}</div>
					<div class="title nickname">{{pagedata.post.mobile || '无手机'}}</div>
				</div>
				<div class="fui-list-angle">
					<div class="angle"></div>
				</div>
			</a>
		</div>
		<div class="fui-cell-group">
			<div class="fui-cell must ">
				<div class="fui-cell-label">昵称</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="设置昵称" ng-model="pagedata.post.nickname" /></div>
			</div>
			<div ng-if="pagedata.post.no_changemobile!=1" class="fui-cell must">
				<div class="fui-cell-label ">手机号</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="设置手机号" ng-model="pagedata.post.mobile" /></div>
				<div ng-if="pagedata.post.login_type>0 && !pagedata.bindmobile && pagedata.post.oldmobile" class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" ng-click="pagedata.bindmobile=true;pagedata.post.mobile=''">解绑手机</a></div>
				<div ng-if="pagedata.post.login_type>0 && (pagedata.bindmobile || !pagedata.post.oldmobile)" class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" ng-click="tool.mobile_code({'mobile':pagedata.post.mobile,'oldmobile':pagedata.post.oldmobile},'sms_code')" id="sms_code">获取验证码</a></div>
			</div>
			<div ng-if="pagedata.post.no_changemobile!=1&& pagedata.post.login_type>0 && (pagedata.bindmobile || !pagedata.post.oldmobile)" class="fui-cell must ">
				<div class="fui-cell-label ">验证码</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入验证码" ng-model="pagedata.post.smscode" /></div>
			</div>
			<div class="fui-cell must">
				<div class="fui-cell-label">性别</div>
				<div class="fui-cell-info">
				<select ng-model="pagedata.post.sex" class="form-control tpl-province">
					<option value="" selected="selected">请选择</option>
					<option value="1" ng-selected="pagedata.post.sex==1">男</option>
					<option value="2" ng-selected="pagedata.post.sex==2">女</option>
				</select>
				</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label">学历</div>
				<div class="fui-cell-info">
				<select ng-model="pagedata.post.xueli" class="form-control tpl-province">
					<option value="" selected="selected">请选择</option>
					<option value="{{key}}" ng-repeat="(key,value) in pagedata.xueli" ng-selected="pagedata.post.xueli==key">{{value}}</option>
				</select>
				</div>
			</div>
			<div class="fui-cell must">
				<div class="fui-cell-label">出生日期</div>				
							<div class="fui-cell-info">
								<select ng-model="pagedata.post.birth" class="form-control tpl-province">
								<option value="" selected="selected">年</option>
								<option ng-repeat="value in pagedata.years" value="{{value}}" ng-selected="pagedata.post.birth==value">{{value}}</option>
								</select>
							</div>
				
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label ">所在城市</div>		
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.post.pcd.province" class="form-control tpl-province">
								<option value="" selected="selected">省份</option>
								<option ng-repeat="(value,data) in pagedata.province" value="{{value}}" ng-selected="pagedata.post.pcd.province==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.post.pcd.city" class="form-control tpl-city">
								<option value="" selected="selected">城市</option>
								<option ng-repeat="(value,data) in pagedata.province[pagedata.post.pcd.province]" value="{{value}}" ng-selected="pagedata.post.pcd.city==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.post.pcd.district" class="form-control tpl-district">
								<option value="" selected="selected">区县</option>
								<option ng-repeat="(value,data) in pagedata.province[pagedata.post.pcd.province][pagedata.post.pcd.city]" value="{{value}}" ng-selected="pagedata.post.pcd.district==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.post.pcd.street" class="form-control tpl-district">
								<option value="" selected="selected">街道</option>
								<option ng-repeat="value in pagedata.province[pagedata.post.pcd.province][pagedata.post.pcd.city][pagedata.post.pcd.district]" value="{{value}}" ng-selected="pagedata.post.pcd.street==value">{{value}}</option>
								</select>
							</div>
				
			</div>
		</div>
		<a href='javascript:;' ng-click="post(pagedata.post,'post')" class='btn btn-success block'>确认修改</a>
	</div>
</div>
<div ng-include="sys_html('common/_footer')"></div>
<script>
window.scope.location(function(re){
	var pcd = scope.pagedata.post.pcd
	if(!pcd || pcd ==''){
		scope.pagedata.post.pcd.province = re.addressComponents.province
		scope.pagedata.post.pcd.city = re.addressComponents.city
		scope.pagedata.post.pcd.district = re.addressComponents.district
		scope.$evalAsync();
	}
});
scope.pagedata.getprovince=function(){
	scope.get('core/member.set/getprovince/',function(res){
		scope.pagedata.province=res.province;
		scope.$evalAsync();
	});
}
scope.pagedata.getprovince();
</script>
